package basics;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-10-27
 * Time: 19:45
 */

//按照字符流来写文件
public class Demo5 {
    public static void main(String[] args) {
        try(Writer writer = new FileWriter("e:/demo1.txt")){
            //直接写入若干字符
            writer.write("xyz");
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
